package hu.arguscab.ai;

/**
 * Represents a class that calculate Fitness Value for different states.
 * @author sharp
 */
public abstract class FitnessFunction {

	/**
	 * Milyen mrétékben számítson bele ennek a FitnessFunctionnek az értéke a Fitness által
	 * kiszámolt végértékbe. 
	 * TODO: Ennek nem a Fitnessorban a helye?
	 */
	private float weight;

	/**
	 * @return The minimum value that this <code>FitnessFunction<code> could return.
	 */
	public abstract float getMinValue();
	
	/**
	 * @return The maximum value that this <code>FitnessFunction</code> could return.
	 */
	public abstract float getMaxValue();
	
	/**
	 * @param m The <code>Model</code> whose Fitness Value are calculated.
	 * @return The Fitness Value of the specified Model.
	 */
	public abstract float calcF(Model m);

	public float getWeight() {
		return weight;
	}

	public void setWeight(float weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return getClass().getSimpleName();
	}
}
